package com.javasm.mb_store_api_final.config;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.web.client.RestTemplate;

@Configuration
@MapperScan("com.javasm.mb_store_api_final.*.*.dao,com.javasm.mb_store_api_final.*.*.*.dao")
//@EnableAspectJAutoProxy
@EnableTransactionManagement//开启了事务注解
@EnableAsync//异步任务注解识别
@EnableScheduling  //定时任务
public class ServerConfig {
    @Bean
    public RestTemplate restTemplate(){
        return new RestTemplate();
    }
}
